<%@page import="javax.portlet.PortletURL"%>
<%@page import="com.bkav.portal.potlet.model.Employee"%>
<%@page import="java.util.List"%>
<%@page import="com.bkav.portal.potlet.model.Employee"%>
<%@page import="java.util.List"%>
<%@page import="com.liferay.portal.kernel.util.ListUtil"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@page import="com.bkav.portal.potlet.service.EmployeeLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.util.ListUtil"%>
<%@page import="com.liferay.portal.kernel.util.StringUtil"%>
<%@page import="com.bkav.portal.potlet.service.EmployeeLocalServiceUtil"%>
<%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet"%>

<portlet:defineObjects />
<b>Employee mvc View mode</b>
<%@ include file="/html/employee/init.jsp"%>
>
<hr/>
<%                  
List<Employee> listEmployee = EmployeeLocalServiceUtil.getEmployees(0, 100);                   
%>

<%
PortletURL iteratorURL= renderResponse.createRenderURL();
iteratorURL.setParameter("jspPage", "/html/employee/view.jsp");
%>

<liferay-ui:search-container delta="20" iteratorURL="<%=iteratorURL%>"> 
       <liferay-ui:search-container-results
              results="<%=ListUtil.subList(listEmployee, searchContainer.getStart(),searchContainer.getEnd())%>"
                      total="<%=listEmployee.size() %>"/>
       <liferay-ui:search-container-row
       className="com.bkav.portal.potlet.model.Employee"
       modelVar="employee" rowVar="">  
              <liferay-ui:search-container-column-text name="Id" align = "left" value="<%= StringUtil.valueOf(employee.getEmployeeId()) %>"/>
              <liferay-ui:search-container-column-text name="Name" align = "left" value="<%=employee.getEmployeeName()%>"/>
			  <liferay-ui:search-container-column-text name="Des" align="left" value="<%=employee.getEmployeeDesc()%>" />
	          <liferay-ui:search-container-column-text name="Job" align="left" value="<%=employee.getEmployeeJob()%>" />
    </liferay-ui:search-container-row>
     <liferay-ui:search-iterator searchContainer="<%= searchContainer %>" paginate="true"/>
</liferay-ui:search-container>
<br/>
<br/>
<br/>
<hr/>